
export default {
    changeCity(state, city) {
        state.city = city
        try {
            localStorage.city = city
        } catch (e) {
        }
    },
    changeArticle(state, articleId) {
        state.articleId = articleId
        try {
            localStorage.articleId = articleId
        } catch (e) {
        }
    },
    // setUser(state, user) {
    //     state.user = user;
    //     try {
    //         localStorage.user = user
    //     } catch (e) {
    //     }
    // },
    setUser(state, user) {
        state.user = user;
        // console.log("user",user)
        SessionStorage.set('USER', user);
        // console.log('session',SessionStorage.get(user))
    }
}
